package com.rain.query;

/**
 * 通用参数基类，支持分页和排序
 */
public class BaseQuery {

    private SimplePage simplePage;
    private String orderBy;
    private Integer pageNo;
    private Integer pageSize;

    public BaseQuery() {
        // simplePage 默认为 null，由外部显式设置
    }

    public SimplePage getSimplePage() {
        return simplePage;
    }

    public void setSimplePage(SimplePage simplePage) {
        this.simplePage = simplePage;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public Integer getPageNo() {
            return pageNo;
        }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void refresh() {
        if (this.simplePage != null) {
            this.simplePage.refresh();
        }
    }
}
